.bg-light-floor-archive {
  background: convert(hexo-config('archive.background'));
  background-size: cover;
  background-position: center center;
}

.archive-header {
  position: relative;
  width: 100%;
  height: 60vh;

  if (hexo-config('archive.full')) {
    height: 100vh;
  }

  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-color: $color-primary;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: $color-inner;

  .archive-header-title {
    z-index: 2;
    font-size: 2.5rem;
    font-family: MV Boli;
    color: #fff;
  }

  .archive-header-desc {
    z-index: 2;
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1.4em;
    font-family: 'Architects Daughter', cursive !important;
    color: #fff;
    min-height: 1.4em;
  }

  .mask-box {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #000;
    opacity: 0.2;
    z-index: 1;
  }
}

.archive-video {
  width: 100%;
  height: 100vh;
  color: $color-inner;

  video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .video-header-title {
    z-index: 2;
    font-size: 2.5rem;
    font-family: MV Boli;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
  }

  .video-header-desc {
    z-index: 2;
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1.4em;
    font-family: 'Architects Daughter', cursive !important;
    color: #fff;
    min-height: 1.4em;
    position: absolute;
    left: 50%;
    top: calc(50% + 50px);
    transform: translate(-50%, -50%);
  }

  .mask-box {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #000;
    opacity: 0.2;
    z-index: 1;
  }
}

@media (min-width: 992px) {
  if (hexo-config('archive.video')) {
    .archive-video {
      display: block;
    }

    .archive-header {
      display: none;
    }
  } else {
    .archive-video {
      display: none;
    }

    .archive-header {
      display: flex;
    }
  }
}

@media (max-width: 992px) {
  .archive-video {
    display: none;
  }

  .archive-header {
    display: flex;
  }

  .archive-content {
    max-width: 100% !important;
  }
}

.archive-main {
  min-height: 60vh;
}

.archive {
  padding: 0 40px 0 60px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;

  .archive-content {
    position: relative;
    max-width: 25%;
  }

  .post-archive {
    &::before {
      content: ' ';
      height: 100%;
      width: 1px;
      background-color: #d9d9d9;
      position: absolute;
      top: 0;
      left: -2.4em;
      z-index: -1;
    }

    .year {
      position: relative;
      margin-bottom: 40px;

      a {
        color: #273849;

        if (hexo-config('archive.yearColor')) {
          color: convert(hexo-config('archive.yearColor'));
        }

        transition: color 0.3s;

        &:hover {
          color: $color-primary !important;
        }

        font-weight: 700;
        font-size: 2em;
      }

      .bullet {
        width: 1rem;
        height: 1rem;
        box-sizing: border-box;
        border-radius: 50%;
        background: #bbb;
        z-index: 1;
        position: absolute;
        left: -2.4em;
        top: 50%;
        transform: translate(-50%, -50%);
      }
    }

    .post-item {
      margin-bottom: 40px;
      list-style: none;
      display: flex;
      align-items: center;

      .post-img-box {
        width: 80px;
        height: 80px;
        overflow: hidden;

        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }

      .post-img {
        display: block;
        width: 100%;
        height: 100%;
        transition: all 0.6s;

        &:hover {
          transform: scale(1.4);
        }
      }

      .post-date-title {
        margin-left: 10px;
        flex: 1;
      }

      .post-date {
        display: inline-block;
        padding: 0 5px;
        background-color: $color-primary;
        color: #ffffff;

        if (hexo-config('archive.monthColor')) {
          color: convert(hexo-config('archive.monthColor'));
        }

        border-radius: 5px;
      }

      .post-title {
        color: #555;

        if (hexo-config('archive.titleColor')) {
          color: convert(hexo-config('archive.titleColor'));
        }

        transition: all 0.3s;
        text-overflow: -o-ellipsis-lastline;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 2;

        &:hover {
          color: $color-primary;
        }
      }

      .post-title::before {
        top: 10px;
        width: 18px;
        height: 18px;
        content: '📚';
        margin-right: 5px;
        font: normal normal normal 14px / 1 FontAwesome;
        font-size: 15px;
        line-height: 18px;
      }
    }
  }
}